import {Pipe ,PipeTransform} from '@angular/core';
@Pipe({
    name:'test'
})
export class test implements PipeTransform{
    transform(val:string):string{
        console.log('管道值',val);
        switch(val){
            case '1':return '输入1';
            case '2':return '输入2';
            default:break;
        }
        return '未知字符串'
    }
}